A REYES image rendering architecture is a system for computing computer animated video or images. The details of an exemplary REYES image rendering architecture are described in detail by Robert L. Cook, et al. in “The Reyes Image Rendering Architecture”, Computer Graphics, vol. 21, no. 4, July 1987, which is incorporated herein by reference. When processed in conjunction with a REYES image rendering architecture compatible renderer (a “REYES renderer”), primitives represent objects that may be included in the computer animated video or images. These primitives are typically diced into polygonal meshes prior to being shaded and projected onto an image plane. After projecting the polygonal meshes onto the image plane, visible polygons are identified. More specifically, the polygons closest to defined elements of the image plane are identified. These elements may comprise infinitesimal points, lines, or areas on the image plane. Color values computed for vertices of the visible polygons are then used to compute color values for the image plane.
To ensure that a sufficient amount of primitive detail is included in the computer animated video or images, each polygon in the polygonal meshes is approximately equal in size to a pixel (e.g., the smallest distinct area of the image plane). Computer animated video or images are represented by an array of numbers. In the case of a two-dimensional image, the array of numbers is a two-dimensional array and each number in the array corresponds to a tiny portion of the image. Each element in the array is referred to as a picture element (or pixel); and the pixel ordinarily has the same location in the array as the portion of the image it represents. In the case of a gray scale image, the numerical value of each pixel represents the relative brightness (or intensity) of the portion of the image to which it corresponds. In the case of a color image, the numerical value of each pixel is a set of numbers (or a vector) representing the color of the portion of the image to which it corresponds. Several different systems are available for numerical representation of colors.
The amount of dicing applied to a primitive is, therefore, dependant upon the size of the primitive relative to a pixel. If the primitive is much larger, for example, a large amount of dicing may be required. Similarly, if the primitive is close in size to the pixel, a relatively small amount of dicing may be required.
Additionally, polygonal meshes produced by a REYES renderer are processed separately so that the REYES renderer need not maintain all of the polygonal meshes in memory or access more than just a subset of the polygonal meshes at any one time. Because of this aspect of a REYES renderer, color values computed for vertices do not typically incorporate global illumination. Persons skilled in the art recognize that global illumination includes accounting for the effects of other primitives in an object scene on a vertex being shaded (e.g., accounting for light reflected off of another primitive onto the vertex being shaded). Instead, a REYES renderer typically shades the vertices with texture maps and other non-global illumination techniques.
So while a REYES renderer ensures that primitive complexity is well represented and that not all of the polygonal meshes created for computer animated video or images are maintained in memory or accessed at any one time, the REYES renderer merely estimates how other primitives in an object affect the color values computed for the vertices.
Prior art renderers that incorporate ray-tracing (“ray tracing renderers”) trace a first set of rays (e.g., “visibility rays”) from an imaginary camera or viewer's eye through a position (e.g., a pixel) on the image plane into an object scene. The positions at which the rays intersect the object scene are visible from the image plane. More specifically, a position intersected by a visibility ray is visible from the position on the image plane through which the ray is cast.
A relatively large number of rays are typically cast through, for example, each pixel of an image plane in an effort to ensure that a sufficient amount of primitive detail is included in the computer animated video or images. But this is not usually practical for typical object scenes. First, intersecting the number of rays necessary to recreate the sufficient amount of primitive detail requires too much processing time. Second, rays are typically cast without consideration of the primitives that may or may not be intersected, so there is no assurance that all visible complexities are intersected by any rays.
But shading the positions at which the rays intersect the object scene typically includes casting a set of rays (e.g., shading rays) from each of the positions. Some or all of the shading rays may intersect other objects in the object scene. Color values computed at positions intersected by shading rays, are then used to compute color values for the positions intersected by visibility rays. Ray tracing renderers, therefore, use global illumination to compute color values.
Ray tracing renderers may also dice primitives into polygonal meshes. But polygons included in such polygonal meshes may not include polygons approximately equal in size to a pixel. Instead, the size of the polygons is dependant upon, for example, the curvature of the object modeled by a corresponding primitive. Often times, therefore, polygonal meshes diced from a given primitive for a ray tracing renderer are much less complex than polygonal meshes diced from the same primitive by a REYES renderer. As the complexity of a polygonal mesh decreases, so does the amount of processing time required to determine whether a ray intersects the polygonal mesh.
There is needed in the art, therefore, an efficient system and method for combining the more beneficial aspects of a REYES renderer and a ray tracing renderer. More specifically, a system and method for efficiently incorporating the use of global illumination into a REYES renderer.
Prior art systems that do combine the more beneficial aspects of a REYES renderer and a ray tracing renderer (albeit inefficiently) cast rays from positions on polygonal meshes suitable for a REYES renderer (e.g., polygonal meshes comprising polygons approximately equal in size to a pixel) for intersection with polygonal meshes suitable for a ray tracing renderer (e.g., polygonal meshes comprising polygons sized by reference to a primitive represented by the polygonal meshes). Often times, however, these rays invalidly intersect or fail to intersect these primitives because of the differences between how polygonal meshes suitable for a REYES renderer are created and how polygonal meshes suitable for a ray tracing renderer are created. There is needed in the art, therefore, a system and method of tracing rays for a polygonal mesh suitable for a REYES renderer that avoids invalidly intersecting or failing to intersect other primitives.
And as noted above, vertices of polygonal meshes are shaded by a REYES renderer. So in these prior art systems that combine the more beneficial aspects of a REYES renderer and a ray tracing renderer (albeit inefficiently) rays are cast from vertices. And again, a REYES renderer does not maintain or access all of the polygonal meshes created for computer animated video or images at any one time. As a result, rays often invalidly intersect other primitives in an object scene. There is needed in the art, therefore, a system and method of shading vertices with rays that avoids invalidly intersecting other primitives in an object scene.